<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    //无参无返回值
    function f1() {
        console.log("无返回值调用")
    }
    //调用
    f1();
    //有参无返回值
    function f2(name,age) {
        console.log(name+":"+age)
    }
    f2 ("孙尚香",1);
    //无参有返回值
    function f3(){
        return "我是无参返回值";
    }
    let f = f3();
    console.log(f)
    //有参有返回值
    function f4(x,y){
        return x*y;
    }
    let fa = f4(8,9);
    console.log(fa);

    //第二种生命方法的方式
    let f5 = function (name,age) {
        console.log(name+"+"+age)
    }
    f5("上官婉儿",99)
    //第三种声明方式
    let f6 = new Function ("name","age","console.log(name+'+'+age)");
    console.log(f6)
</script>

</body>
</html>